from sqlalchemy import create_engine, Column, Integer, String,DateTime

from sqlalchemy.ext.declarative import declarative_base
# 创建基类
Base = declarative_base()

class FlowReport(Base):
    __tablename__ = 'flow_report'
    id = Column(Integer, primary_key=True,autoincrement=True)
    biz_id = Column(Integer)
    biz_name = Column(String(500))
    vmid = Column(Integer)
    flow_id = Column(String(500))
    date = Column(DateTime)
    start_time = Column(DateTime)
    end_time = Column(DateTime)
    status = Column(Integer) # 0初始化状态 1正常 2 异常


class BundleStatistics(Base):
    __tablename__ = 'bundle_statistics'
    biz_id = Column(Integer, primary_key=True)
    biz_name = Column(String(255))
    total_num = Column(Integer)
    use_num = Column(Integer)